﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using CIT.WMS.MESWcf;
using System.Data;
using System.Data.SqlClient;
using CIT.WMS.SQLService;

namespace CIT.WMS
{
    public class NMS
    {
        //public NewDB.SQLDBService sqlDBService = new CIT.WMS.NewDB.SQLDBService();
        //public NewDB102.SQLDBService sqlDBService = new CIT.WMS.NewDB102.SQLDBService();
        //海盐
        public AhyDBService.SQLDBService sqlDBService = new CIT.WMS.AhyDBService.SQLDBService();
        //曲靖
        //public SQLDBService102.SQLDBService sqlDBService = new SQLDBService102.SQLDBService();
        //public SQLDBService sqlDBService = new SQLDBService();

        public void Exectransql(UserContext uContext, string sqlcmd, CmdParameter[] sqlparameter, out bool ExectransqlResult, out bool ExectransqlResultSpecified)
        {
            ExectransqlResult = true;
            ExectransqlResultSpecified = true;
            sqlDBService.ExcuteScalarSQL(sqlcmd);
        }
        public DataTable QueryDataTable(UserContext uContext, string sqlcmd, CmdParameter[] sqlparameter)
        {
            var dt = sqlDBService.GetTable(sqlcmd);
            return dt;
        }

        public DataTable QueryDataTable(UserContext uContext, string sqlcmd, SqlParameter[] sqlparameter)
        {
            var dt = sqlDBService.GetTable(sqlcmd);
            return dt;
        }

        public int ExcuteSQL(string sqlcmd)
        {
            var dt = sqlDBService.ExcuteSQL(sqlcmd);
            return dt;
        }

        public DataSet QueryDataSet(UserContext uContext, string sqlcmd, CmdParameter[] sqlparameter)
        {
            var dt = sqlDBService.GetDataSet(sqlcmd);
            return dt;
        }

        public DataTable GetDataTable(string sqlcmd)
        {
            var dt = sqlDBService.GetTable(sqlcmd);
            return dt;
        }

    }
}
